<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
      .parent{
        width: 200px;
        height: 200px;
        background-color: skyblue;
        display:flex;
        /* justify-content: flex-start; 左对齐 */
        /* justify-content: flex-end; 右对齐 */
        /* justify-content:space-between; 两端对齐,盒子之间间距都相等 */
        /* justify-content:space-around; 每个盒子两侧的间距相等 */
        justify-content:center; /*水平居中*/
      }
      .parent div{
        width: 50px;
        height: 50px;
        background-color: green;
      }
  </style>
</head>
<body>
  <div class="parent">
      <div>1</div>
      <div>2</div>
      <div>3</div>
  </div>
</body>
</html>